<template>
	<view class="contentBox">
		<view>
			<text class="headertext">{{title}}</text>
		</view>
		<text style="color: #929292; float: right;">
			 {{time}}
		</text>
	   <view >
	   	<text class="content">
	   		{{informationContent}}
	   	</text>
	   </view>
		
		<view>
		   <text>{{info}}</text>	
		</view>
		<view style="margin-right: 10upx;">
		    <rich-text :nodes="content" ></rich-text>
		</view>
		<!-- <button @click="returnto" :disabled="back">{{time}}</button> -->
		
	</view>
</template>

<script>
	import eonfox from "@/components/eonfox/eonfox.js"
	import fns from '@/components/eonfox/fns.js';
	var ef = new eonfox();
	export default {
		data(){
			return {
			    title:'',
				informationContent:'',
				info:'',
				content:'',
				time:''
			}
		},
		
		methods:{
			returnto() {
				uni.navigateBack({
					delta:1
				})
			}
		},
		onLoad:function(e){
			console.log('传过来的值',e)
				var that=this;
			ef.submit({
			request:{
			s: ['CMSARTICLEGET',[{id:e.newsId}]]
			},
			callback: function(data) {
				console.log('详细内容', data);
				if (fns.checkError(data, "s", function(erron, error) {
									uni.showToast({
										title: error,
										icon: 'none'
									})
								}));
					that.title=data.data.s.data.name;
					that.informationContent=data.data.s.data.details;
					that.info=data.data.s.data.info;
					that.content=data.data.s.data.content;
					that.time=data.data.s.data.time
					},				
			error: function(err) {
							uni.showToast({
							title:'出错啦',
							icon:'none'
								})
								}
								
							});
		}
	}
</script>

<style>
	.contentBox{
		width: 96%;
		padding-left: 2%;
		padding-right: 2%;
		height: auto;
		font-size: 28upx;
	}
	.headertext{
		    float: left;
			width: 100%;
			height:80upx;
			color:#333333;
			font-size: 38upx;
			text-align:center;
			line-height: 80upx;
			line-height: 1em;
	}
	.content{
		float: left;
		width: 100%;
		height: auto;
		font-size: 30upx;
		padding: 15upx;
	}
	image{
		width: 90%;
		margin-left: 5%;
		height: 400upx;
	}
	.contentBox view{
		display: flex;
		width: 100%;
	}
	rich-text{
		width: 98%;
		margin-right: 2%;
		color: #555555;
	}
	
</style>

